home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / Folders.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  23.8 KB  |  531 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        Folders.h
  3.  
  4.      Contains:    Folder Manager Interfaces.
  5.  
  6.      Version:    Technology:    Mac OS 8
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1995-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __FOLDERS__
  18. #define __FOLDERS__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __MIXEDMODE__
  25.     #include <MixedMode.h>
  26. #endif
  27.  
  28. #ifndef __FILES__
  29.     #include <Files.h>
  30. #endif
  31.  
  32.  
  33.  
  34.  
  35. #if PRAGMA_ONCE
  36. #pragma once
  37. #endif
  38.  
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42.  
  43. #if PRAGMA_IMPORT
  44. #pragma import on
  45. #endif
  46.  
  47. #if PRAGMA_STRUCT_ALIGN
  48.     #pragma options align=mac68k
  49. #elif PRAGMA_STRUCT_PACKPUSH
  50.     #pragma pack(push, 2)
  51. #elif PRAGMA_STRUCT_PACK
  52.     #pragma pack(2)
  53. #endif
  54.  
  55. enum {
  56.     kOnSystemDisk                = -32768L,                        /* previously was 0x8000 but that is an unsigned value whereas vRefNum is signed*/
  57.     kOnAppropriateDisk            = -32767                        /* Generally, the same as kOnSystemDisk, but it's clearer that this isn't always the 'boot' disk.*/
  58. };
  59.  
  60. enum {
  61.     kCreateFolder                = true,
  62.     kDontCreateFolder            = false
  63. };
  64.  
  65. enum {
  66.     kSystemFolderType            = FOUR_CHAR_CODE('macs'),        /* the system folder */
  67.     kDesktopFolderType            = FOUR_CHAR_CODE('desk'),        /* the desktop folder; objects in this folder show on the desk top. */
  68.     kSystemDesktopFolderType    = FOUR_CHAR_CODE('sdsk'),        /* the desktop folder at the root of the hard drive, never the redirected user desktop folder */
  69.     kTrashFolderType            = FOUR_CHAR_CODE('trsh'),        /* the trash folder; objects in this folder show up in the trash */
  70.     kSystemTrashFolderType        = FOUR_CHAR_CODE('strs'),        /* the trash folder at the root of the drive, never the redirected user trash folder */
  71.     kWhereToEmptyTrashFolderType = FOUR_CHAR_CODE('empt'),        /* the "empty trash" folder; Finder starts empty from here down */
  72.     kPrintMonitorDocsFolderType    = FOUR_CHAR_CODE('prnt'),        /* Print Monitor documents */
  73.     kStartupFolderType            = FOUR_CHAR_CODE('strt'),        /* Finder objects (applications, documents, DAs, aliases, to...) to open at startup go here */
  74.     kShutdownFolderType            = FOUR_CHAR_CODE('shdf'),        /* Finder objects (applications, documents, DAs, aliases, to...) to open at shutdown go here */
  75.     kAppleMenuFolderType        = FOUR_CHAR_CODE('amnu'),        /* Finder objects to put into the Apple menu go here */
  76.     kControlPanelFolderType        = FOUR_CHAR_CODE('ctrl'),        /* Control Panels go here (may contain INITs) */
  77.     kSystemControlPanelFolderType = FOUR_CHAR_CODE('sctl'),        /* System control panels folder - never the redirected one, always "Control Panels" inside the System Folder */
  78.     kExtensionFolderType        = FOUR_CHAR_CODE('extn'),        /* System extensions go here */
  79.     kFontsFolderType            = FOUR_CHAR_CODE('font'),        /* Fonts go here */
  80.     kPreferencesFolderType        = FOUR_CHAR_CODE('pref'),        /* preferences for applications go here */
  81.     kSystemPreferencesFolderType = FOUR_CHAR_CODE('sprf'),        /* System-type Preferences go here - this is always the system's preferences folder, never a logged in user's */
  82.     kTemporaryFolderType        = FOUR_CHAR_CODE('temp')        /* temporary files go here (deleted periodically, but don't rely on it.) */
  83. };
  84.  
  85. EXTERN_API( OSErr )
  86. FindFolder                        (short                     vRefNum,
  87.                                  OSType                 folderType,
  88.                                  Boolean                 createFolder,
  89.                                  short *                foundVRefNum,
  90.                                  long *                    foundDirID)                            TWOWORDINLINE(0x7000, 0xA823);
  91.  
  92. EXTERN_API( OSErr )
  93. FindFolderExtended                (short                     vol,
  94.                                  OSType                 foldType,
  95.                                  Boolean                 createFolder,
  96.                                  UInt32                 flags,
  97.                                  void *                    data,
  98.                                  short *                vRefNum,
  99.                                  long *                    dirID)                                THREEWORDINLINE(0x303C, 0x0B2C, 0xA823);
  100.  
  101. EXTERN_API( OSErr )
  102. ReleaseFolder                    (short                     vRefNum,
  103.                                  OSType                 folderType)                            TWOWORDINLINE(0x700B, 0xA823);
  104.  
  105.  
  106. #if !TARGET_OS_MAC
  107. /* Since non-mac targets don't know about VRef's or DirID's, the Ex version returns
  108.    the found folder path.
  109.  */
  110. EXTERN_API_C( OSErr )
  111. FindFolderEx                    (short                     vRefNum,
  112.                                  OSType                 folderType,
  113.                                  Boolean                 createFolder,
  114.                                  short *                foundVRefNum,
  115.                                  long *                    foundDirID,
  116.                                  char *                    foundFolder);
  117.  
  118. #endif  /* !TARGET_OS_MAC */
  119.  
  120. /******************************************/
  121. /* Extensible Folder Manager declarations */
  122. /******************************************/
  123.  
  124. /****************************/
  125. /* Folder Manager constants */
  126. /****************************/
  127.  
  128. enum {
  129.     kExtensionDisabledFolderType = FOUR_CHAR_CODE('extD'),
  130.     kControlPanelDisabledFolderType = FOUR_CHAR_CODE('ctrD'),
  131.     kSystemExtensionDisabledFolderType = FOUR_CHAR_CODE('macD'),
  132.     kStartupItemsDisabledFolderType = FOUR_CHAR_CODE('strD'),
  133.     kShutdownItemsDisabledFolderType = FOUR_CHAR_CODE('shdD'),
  134.     kApplicationsFolderType        = FOUR_CHAR_CODE('apps'),
  135.     kDocumentsFolderType        = FOUR_CHAR_CODE('docs')
  136. };
  137.  
  138. enum {
  139.                                                                 /* new constants */
  140.     kVolumeRootFolderType        = FOUR_CHAR_CODE('root'),        /* root folder of a volume */
  141.     kChewableItemsFolderType    = FOUR_CHAR_CODE('flnt'),        /* items deleted at boot */
  142.     kApplicationSupportFolderType = FOUR_CHAR_CODE('asup'),        /* third-party items and folders */
  143.     kTextEncodingsFolderType    = FOUR_CHAR_CODE('ƒtex'),        /* encoding tables */
  144.     kStationeryFolderType        = FOUR_CHAR_CODE('odst'),        /* stationery */
  145.     kOpenDocFolderType            = FOUR_CHAR_CODE('odod'),        /* OpenDoc root */
  146.     kOpenDocShellPlugInsFolderType = FOUR_CHAR_CODE('odsp'),    /* OpenDoc Shell Plug-Ins in OpenDoc folder */
  147.     kEditorsFolderType            = FOUR_CHAR_CODE('oded'),        /* OpenDoc editors in MacOS Folder */
  148.     kOpenDocEditorsFolderType    = FOUR_CHAR_CODE('ƒodf'),        /* OpenDoc subfolder of Editors folder */
  149.     kOpenDocLibrariesFolderType    = FOUR_CHAR_CODE('odlb'),        /* OpenDoc libraries folder */
  150.     kGenEditorsFolderType        = FOUR_CHAR_CODE('ƒedi'),        /* CKH general editors folder at root level of Sys folder */
  151.     kHelpFolderType                = FOUR_CHAR_CODE('ƒhlp'),        /* CKH help folder currently at root of system folder */
  152.     kInternetPlugInFolderType    = FOUR_CHAR_CODE('ƒnet'),        /* CKH internet plug ins for browsers and stuff */
  153.     kModemScriptsFolderType        = FOUR_CHAR_CODE('ƒmod'),        /* CKH modem scripts, get 'em OUT of the Extensions folder */
  154.     kPrinterDescriptionFolderType = FOUR_CHAR_CODE('ppdf'),        /* CKH new folder at root of System folder for printer descs. */
  155.     kPrinterDriverFolderType    = FOUR_CHAR_CODE('ƒprd'),        /* CKH new folder at root of System folder for printer drivers */
  156.     kScriptingAdditionsFolderType = FOUR_CHAR_CODE('ƒscr'),        /* CKH at root of system folder */
  157.     kSharedLibrariesFolderType    = FOUR_CHAR_CODE('ƒlib'),        /* CKH for general shared libs. */
  158.     kVoicesFolderType            = FOUR_CHAR_CODE('fvoc'),        /* CKH macintalk can live here */
  159.     kControlStripModulesFolderType = FOUR_CHAR_CODE('sdev'),    /* CKH for control strip modules */
  160.     kAssistantsFolderType        = FOUR_CHAR_CODE('astƒ'),        /* SJF for Assistants (MacOS Setup Assistant, etc) */
  161.     kUtilitiesFolderType        = FOUR_CHAR_CODE('utiƒ'),        /* SJF for Utilities folder */
  162.     kAppleExtrasFolderType        = FOUR_CHAR_CODE('aexƒ'),        /* SJF for Apple Extras folder */
  163.     kContextualMenuItemsFolderType = FOUR_CHAR_CODE('cmnu'),    /* SJF for Contextual Menu items */
  164.     kMacOSReadMesFolderType        = FOUR_CHAR_CODE('morƒ'),        /* SJF for MacOS ReadMes folder */
  165.     kALMModulesFolderType        = FOUR_CHAR_CODE('walk'),        /* EAS for Location Manager Module files except type 'thng' (within kExtensionFolderType) */
  166.     kALMPreferencesFolderType    = FOUR_CHAR_CODE('trip'),        /* EAS for Location Manager Preferences (within kPreferencesFolderType; contains kALMLocationsFolderType) */
  167.     kALMLocationsFolderType        = FOUR_CHAR_CODE('fall'),        /* EAS for Location Manager Locations (within kALMPreferencesFolderType) */
  168.     kColorSyncProfilesFolderType = FOUR_CHAR_CODE('prof'),        /* for ColorSync(tm) Profiles */
  169.     kThemesFolderType            = FOUR_CHAR_CODE('thme'),        /* for Theme data files */
  170.     kFavoritesFolderType        = FOUR_CHAR_CODE('favs'),        /* Favorties folder for Navigation Services */
  171.     kInternetFolderType            = FOUR_CHAR_CODE('intƒ'),        /* Internet folder (root level of startup volume) */
  172.     kAppearanceFolderType        = FOUR_CHAR_CODE('appr'),        /* Appearance folder (root of system folder) */
  173.     kSoundSetsFolderType        = FOUR_CHAR_CODE('snds'),        /* Sound Sets folder (in Appearance folder) */
  174.     kDesktopPicturesFolderType    = FOUR_CHAR_CODE('dtpƒ'),        /* Desktop Pictures folder (in Appearance folder) */
  175.     kInternetSearchSitesFolderType = FOUR_CHAR_CODE('issf'),    /* Internet Search Sites folder */
  176.     kFindSupportFolderType        = FOUR_CHAR_CODE('fnds'),        /* Find support folder */
  177.     kFindByContentFolderType    = FOUR_CHAR_CODE('fbcf'),        /* Find by content folder */
  178.     kInstallerLogsFolderType    = FOUR_CHAR_CODE('ilgf'),        /* Installer Logs folder */
  179.     kScriptsFolderType            = FOUR_CHAR_CODE('scrƒ'),        /* Scripts folder */
  180.     kFolderActionsFolderType    = FOUR_CHAR_CODE('fasf'),        /* Folder Actions Scripts folder */
  181.     kLauncherItemsFolderType    = FOUR_CHAR_CODE('laun'),        /* Launcher Items folder */
  182.     kRecentApplicationsFolderType = FOUR_CHAR_CODE('rapp'),        /* Recent Applications folder */
  183.     kRecentDocumentsFolderType    = FOUR_CHAR_CODE('rdoc'),        /* Recent Documents folder */
  184.     kRecentServersFolderType    = FOUR_CHAR_CODE('rsvr'),        /* Recent Servers folder */
  185.     kSpeakableItemsFolderType    = FOUR_CHAR_CODE('spki'),        /* Speakable Items folder */
  186.     kKeychainFolderType            = FOUR_CHAR_CODE('kchn'),        /* Keychain folder */
  187.     kQuickTimeExtensionsFolderType = FOUR_CHAR_CODE('qtex'),    /* QuickTime Extensions Folder (in Extensions folder) */
  188.     kDisplayExtensionsFolderType = FOUR_CHAR_CODE('dspl'),        /* Display Extensions Folder (in Extensions folder) */
  189.     kMultiprocessingFolderType    = FOUR_CHAR_CODE('mpxf'),        /* Multiprocessing Folder (in Extensions folder) */
  190.     kPrintingPlugInsFolderType    = FOUR_CHAR_CODE('pplg')        /* Printing Plug-Ins Folder (in Extensions folder) */
  191. };
  192.  
  193. enum {
  194.     kLocalesFolderType            = FOUR_CHAR_CODE('ƒloc'),        /* PKE for Locales folder */
  195.     kFindByContentPluginsFolderType = FOUR_CHAR_CODE('fbcp')    /* Find By Content Plug-ins */
  196. };
  197.  
  198. enum {
  199.     kUsersFolderType            = FOUR_CHAR_CODE('usrs'),        /* "Users" folder, contains one folder for each user. */
  200.     kCurrentUserFolderType        = FOUR_CHAR_CODE('cusr'),        /* The folder for the currently logged on user. */
  201.     kCurrentUserRemoteFolderLocation = FOUR_CHAR_CODE('rusf'),    /* The remote folder for the currently logged on user */
  202.     kCurrentUserRemoteFolderType = FOUR_CHAR_CODE('rusr'),        /* The remote folder location for the currently logged on user */
  203.     kSharedUserDataFolderType    = FOUR_CHAR_CODE('sdat'),        /* A Shared "Documents" folder, readable & writeable by all users */
  204.     kVolumeSettingsFolderType    = FOUR_CHAR_CODE('vsfd')        /* Volume specific user information goes here */
  205. };
  206.  
  207. /* FolderDescFlags values */
  208. enum {
  209.     kCreateFolderAtBoot            = 0x00000002,
  210.     kFolderCreatedInvisible        = 0x00000004,
  211.     kFolderCreatedNameLocked    = 0x00000008,
  212.     kFolderCreatedAdminPrivs    = 0x00000010
  213. };
  214.  
  215. enum {
  216.     kFolderInUserFolder            = 0x00000020,
  217.     kFolderTrackedByAlias        = 0x00000040,
  218.     kFolderInRemoteUserFolderIfAvailable = 0x00000080,
  219.     kFolderNeverMatchedInIdentifyFolder = 0x00000100,
  220.     kFolderMustStayOnSameVolume    = 0x00000200,
  221.     kFolderInLocalOrRemoteUserFolder = kFolderInUserFolder | kFolderInRemoteUserFolderIfAvailable
  222. };
  223.  
  224. typedef UInt32                             FolderDescFlags;
  225. /* FolderClass values */
  226. enum {
  227.     kRelativeFolder                = FOUR_CHAR_CODE('relf'),
  228.     kSpecialFolder                = FOUR_CHAR_CODE('spcf')
  229. };
  230.  
  231. typedef OSType                             FolderClass;
  232. /* special folder locations */
  233. enum {
  234.     kBlessedFolder                = FOUR_CHAR_CODE('blsf'),
  235.     kRootFolder                    = FOUR_CHAR_CODE('rotf')
  236. };
  237.  
  238. enum {
  239.     kCurrentUserFolderLocation    = FOUR_CHAR_CODE('cusf')        /*    the magic 'Current User' folder location*/
  240. };
  241.  
  242. typedef OSType                             FolderType;
  243. typedef OSType                             FolderLocation;
  244.  
  245.  
  246. struct FolderDesc {
  247.     Size                             descSize;
  248.     FolderType                         foldType;
  249.     FolderDescFlags                 flags;
  250.     FolderClass                     foldClass;
  251.     FolderType                         foldLocation;
  252.     OSType                             badgeSignature;
  253.     OSType                             badgeType;
  254.     UInt32                             reserved;
  255.     StrFileName                     name;                        /* Str63 on MacOS*/
  256. };
  257. typedef struct FolderDesc                FolderDesc;
  258. typedef FolderDesc *                    FolderDescPtr;
  259.  
  260.  
  261. typedef UInt32                             RoutingFlags;
  262.  
  263. struct FolderRouting {
  264.     Size                             descSize;
  265.     OSType                             fileType;
  266.     FolderType                         routeFromFolder;
  267.     FolderType                         routeToFolder;
  268.     RoutingFlags                     flags;
  269. };
  270. typedef struct FolderRouting            FolderRouting;
  271. typedef FolderRouting *                    FolderRoutingPtr;
  272. /* routing constants */
  273. /*    These are bits in the .flags field of the FindFolderUserRedirectionGlobals struct*/
  274. enum {
  275.                                                                 /*    Set this bit to 1 in the .flags field of a FindFolderUserRedirectionGlobals*/
  276.                                                                 /*    structure if the userName in the struct should be used as the current*/
  277.                                                                 /*    "User" name*/
  278.     kFindFolderRedirectionFlagUseDistinctUserFoldersBit = 0,    /*    Set this bit to 1 and the currentUserFolderVRefNum and currentUserFolderDirID*/
  279.                                                                 /*    fields of the user record will get used instead of finding the user folder*/
  280.                                                                 /*    with the userName field.*/
  281.     kFindFolderRedirectionFlagUseGivenVRefAndDirIDAsUserFolderBit = 1, /*    Set this bit to 1 and the remoteUserFolderVRefNum and remoteUserFolderDirID*/
  282.                                                                 /*    fields of the user record will get used instead of finding the user folder*/
  283.                                                                 /*    with the userName field.*/
  284.     kFindFolderRedirectionFlagsUseGivenVRefNumAndDirIDAsRemoteUserFolderBit = 2
  285. };
  286.  
  287.  
  288. struct FindFolderUserRedirectionGlobals {
  289.     UInt32                             version;
  290.     UInt32                             flags;
  291.  
  292.     Str31                             userName;
  293.     short                             userNameScript;
  294.  
  295.     short                             currentUserFolderVRefNum;
  296.     long                             currentUserFolderDirID;
  297.  
  298.     short                             remoteUserFolderVRefNum;
  299.     long                             remoteUserFolderDirID;
  300. };
  301. typedef struct FindFolderUserRedirectionGlobals FindFolderUserRedirectionGlobals;
  302. typedef FindFolderUserRedirectionGlobals * FindFolderUserRedirectionGlobalsPtr;
  303. enum {
  304.     kFolderManagerUserRedirectionGlobalsCurrentVersion = 1
  305. };
  306.  
  307. /*
  308.       These are passed into FindFolderExtended(), FindFolderInternalExtended(), and
  309.       FindFolderNewInstallerEntryExtended() in the flags field. 
  310. */
  311. enum {
  312.     kFindFolderExtendedFlagsDoNotFollowAliasesBit = 0,
  313.     kFindFolderExtendedFlagsDoNotUseUserFolderBit = 1,
  314.     kFindFolderExtendedFlagsUseOtherUserRecord = 0x01000000
  315. };
  316.  
  317. typedef CALLBACK_API( OSStatus , FolderManagerNotificationProcPtr )(OSType message, void *arg, void *userRefCon);
  318. typedef STACK_UPP_TYPE(FolderManagerNotificationProcPtr)         FolderManagerNotificationUPP;
  319. #if OPAQUE_UPP_TYPES
  320.     EXTERN_API(FolderManagerNotificationUPP)
  321.     NewFolderManagerNotificationUPP    (FolderManagerNotificationProcPtr userRoutine);
  322.  
  323.     EXTERN_API(void)
  324.     DisposeFolderManagerNotificationUPP    (FolderManagerNotificationUPP userUPP);
  325.  
  326.     EXTERN_API(OSStatus)
  327.     InvokeFolderManagerNotificationUPP    (OSType            message,
  328.                                     void *                    arg,
  329.                                     void *                    userRefCon,
  330.                                     FolderManagerNotificationUPP userUPP);
  331.  
  332. #else
  333.     enum { uppFolderManagerNotificationProcInfo = 0x00000FF0 };     /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  334.     #define NewFolderManagerNotificationUPP(userRoutine)             (FolderManagerNotificationUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppFolderManagerNotificationProcInfo, GetCurrentArchitecture())
  335.     #define DisposeFolderManagerNotificationUPP(userUPP)             DisposeRoutineDescriptor(userUPP)
  336.     #define InvokeFolderManagerNotificationUPP(message, arg, userRefCon, userUPP)  (OSStatus)CALL_THREE_PARAMETER_UPP((userUPP), uppFolderManagerNotificationProcInfo, (message), (arg), (userRefCon))
  337. #endif
  338. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  339. #define NewFolderManagerNotificationProc(userRoutine)             NewFolderManagerNotificationUPP(userRoutine)
  340. #define CallFolderManagerNotificationProc(userRoutine, message, arg, userRefCon) InvokeFolderManagerNotificationUPP(message, arg, userRefCon, userRoutine)
  341. enum {
  342.     kFolderManagerNotificationMessageUserLogIn = FOUR_CHAR_CODE('log+'), /*    Sent by system & third party software after a user logs in.  arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner*/
  343.     kFolderManagerNotificationMessagePreUserLogIn = FOUR_CHAR_CODE('logj'), /*    Sent by system & third party software before a user logs in.  arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner*/
  344.     kFolderManagerNotificationMessageUserLogOut = FOUR_CHAR_CODE('log-'), /*    Sent by system & third party software before a user logs out.  arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner*/
  345.     kFolderManagerNotificationMessagePostUserLogOut = FOUR_CHAR_CODE('logp'), /*    Sent by system & third party software after a user logs out.  arg should point to a valid FindFolderUserRedirectionGlobals structure or nil for the owner*/
  346.     kFolderManagerNotificationDiscardCachedData = FOUR_CHAR_CODE('dche') /*    Sent by third party software when the entire Folder Manager cache should be flushed*/
  347. };
  348.  
  349.  
  350. /*    These get used in the options parameter of FolderManagerRegisterNotificationProc()*/
  351. enum {
  352.     kDoNotRemoveWhenCurrentApplicationQuitsBit = 0,
  353.     kDoNotRemoveWheCurrentApplicationQuitsBit = kDoNotRemoveWhenCurrentApplicationQuitsBit /*    Going away soon, use kDoNotRemoveWheCurrentApplicationQuitsBit*/
  354. };
  355.  
  356. /*    These get used in the options parameter of FolderManagerCallNotificationProcs()*/
  357. enum {
  358.     kStopIfAnyNotificationProcReturnsErrorBit = 31
  359. };
  360.  
  361. /***************************/
  362. /* Folder Manager routines */
  363. /***************************/
  364. /* Folder Manager administration routines */
  365. EXTERN_API( OSErr )
  366. AddFolderDescriptor                (FolderType             foldType,
  367.                                  FolderDescFlags         flags,
  368.                                  FolderClass             foldClass,
  369.                                  FolderLocation         foldLocation,
  370.                                  OSType                 badgeSignature,
  371.                                  OSType                 badgeType,
  372.                                  ConstStrFileNameParam     name,
  373.                                  Boolean                 replaceFlag)                        TWOWORDINLINE(0x7020, 0xA823);
  374.  
  375. EXTERN_API( OSErr )
  376. GetFolderDescriptor                (FolderType             foldType,
  377.                                  Size                     descSize,
  378.                                  FolderDesc *            foldDesc)                            TWOWORDINLINE(0x7023, 0xA823);
  379.  
  380. EXTERN_API( OSErr )
  381. GetFolderTypes                    (UInt32                 requestedTypeCount,
  382.                                  UInt32 *                totalTypeCount,
  383.                                  FolderType *            theTypes)                            TWOWORDINLINE(0x7024, 0xA823);
  384.  
  385. EXTERN_API( OSErr )
  386. RemoveFolderDescriptor            (FolderType             foldType)                            TWOWORDINLINE(0x7021, 0xA823);
  387.  
  388. /* legacy routines */
  389. EXTERN_API( OSErr )
  390. GetFolderName                    (short                     vRefNum,
  391.                                  OSType                 foldType,
  392.                                  short *                foundVRefNum,
  393.                                  StrFileName             name)                                TWOWORDINLINE(0x700E, 0xA823);
  394.  
  395. /* routing routines */
  396. EXTERN_API( OSErr )
  397. AddFolderRouting                (OSType                 fileType,
  398.                                  FolderType             routeFromFolder,
  399.                                  FolderType             routeToFolder,
  400.                                  RoutingFlags             flags,
  401.                                  Boolean                 replaceFlag)                        THREEWORDINLINE(0x303C, 0x0926, 0xA823);
  402.  
  403. EXTERN_API( OSErr )
  404. RemoveFolderRouting                (OSType                 fileType,
  405.                                  FolderType             routeFromFolder)                    THREEWORDINLINE(0x303C, 0x0427, 0xA823);
  406.  
  407. EXTERN_API( OSErr )
  408. FindFolderRouting                (OSType                 fileType,
  409.                                  FolderType             routeFromFolder,
  410.                                  FolderType *            routeToFolder,
  411.                                  RoutingFlags *            flags)                                THREEWORDINLINE(0x303C, 0x0822, 0xA823);
  412.  
  413. EXTERN_API( OSErr )
  414. GetFolderRoutings                (UInt32                 requestedRoutingCount,
  415.                                  UInt32 *                totalRoutingCount,
  416.                                  Size                     routingSize,
  417.                                  FolderRouting *        theRoutings)                        THREEWORDINLINE(0x303C, 0x081E, 0xA823);
  418.  
  419. EXTERN_API( OSErr )
  420. InvalidateFolderDescriptorCache    (short                     vRefNum,
  421.                                  long                     dirID)                                THREEWORDINLINE(0x303C, 0x0325, 0xA823);
  422.  
  423. EXTERN_API( OSErr )
  424. IdentifyFolder                    (short                     vRefNum,
  425.                                  long                     dirID,
  426.                                  FolderType *            foldType)                            THREEWORDINLINE(0x303C, 0x051F, 0xA823);
  427.  
  428.  
  429. EXTERN_API( OSErr )
  430. FolderManagerRegisterNotificationProc (FolderManagerNotificationUPP  notificationProc,
  431.                                  void *                    refCon,
  432.                                  UInt32                 options)                            THREEWORDINLINE(0x303C, 0x062F, 0xA823);
  433.  
  434. EXTERN_API( OSErr )
  435. FolderManagerUnregisterNotificationProc (FolderManagerNotificationUPP  notificationProc,
  436.                                  void *                    refCon)                                THREEWORDINLINE(0x303C, 0x0430, 0xA823);
  437.  
  438. EXTERN_API( OSStatus )
  439. FolderManagerRegisterCallNotificationProcs (OSType         message,
  440.                                  void *                    arg,
  441.                                  UInt32                 options)                            THREEWORDINLINE(0x303C, 0x0631, 0xA823);
  442.  
  443. /*******************************/
  444. /* MultiUser (At Ease) globals */
  445. /*******************************/
  446. /*
  447.    This structure has been through some evolution since the early days of At Ease 1.0.  The structure
  448.    has been expanded (and developers should assume that it will continue this way into the future).  Older
  449.    fields have been obsoleted as the features have changed in newer versions of the code.
  450. */
  451.  
  452. /* Some fields in here are really only valid for the network version of Macintosh Manager*/
  453.  
  454.  
  455. struct MultiUserGestalt {
  456.                                                                 /*    Version 1 fields.*/
  457.     short                             giVersion;                    /* structure version: 0 = invalid, 6 = OS 9*/
  458.     short                             giReserved0;                /* [OBSOLETE with v3] giIsActive: if true then At Ease is currently running*/
  459.     short                             giReserved1;                /* [OBSOLETE] if true then auto create alias*/
  460.     short                             giReserved2;                /* [OBSOLETE with v6]  if true then request floppy on new saves*/
  461.     short                             giReserved3;                /* [OBSOLETE] if true then hypercard stacks are shown on Applications panel*/
  462.     FSSpec                             giReserved4;                /* [OBSOLETE with v6] location of At Ease Items folder*/
  463.  
  464.                                                                 /*    Version 2 fields.*/
  465.     short                             giDocsVRefNum;                /* vrefnum of user's documents location (only valid if not on floppy)*/
  466.     long                             giDocsDirID;                /* directory id of user's documents folder (only valid if not on floppy)*/
  467.     short                             giForceSaves;                /* true if user is forced to save to their documents folder*/
  468.     short                             giForceOpens;                /* true if user is forced to open from their documents folder*/
  469.     Str31                             giSetupName;                /* name of current setup*/
  470.     Str31                             giUserName;                    /* name of current user*/
  471.     Str31                             giFrontAppName;                /* name of the frontmost application*/
  472.     short                             giReserved5;                /* [OBSOLETE with v6] true if user has Go To Finder menu item*/
  473.     short                             giIsOn;                        /* true if Multiple Users/Macintosh Manager is on right now*/
  474.  
  475.                                                                 /*    Version 3 fields.*/
  476.                                                                 /*  There were no additional fields for version 3.x*/
  477.  
  478.                                                                 /*    Version 4 fields.*/
  479.     short                             giUserLoggedInType;            /* 0 = normal user, 1 = workgroup admin, 2 = global admin*/
  480.     char                             giUserEncryptPwd[16];        /* encrypted user password (our digest form)*/
  481.     short                             giUserEnvironment;            /* 0 = panels, 1 = normal Finder, 2 = limited/restricted Finder*/
  482.     long                             giReserved6;                /* [OBSOLETE]*/
  483.     long                             giReserved7;                /* [OBSOLETE]*/
  484.     Boolean                         giDisableScrnShots;            /* true if screen shots are not allowed*/
  485.  
  486.                                                                 /*    Version 5 fields.*/
  487.     Boolean                         giSupportsAsyncFSCalls;        /* Finder uses this to tell if our patches support async trap patches*/
  488.     short                             giPrefsVRefNum;                /* vrefnum of preferences*/
  489.     long                             giPrefsDirID;                /* dirID of the At Ease Items folder on preferences volume*/
  490.     unsigned long                     giUserLogInTime;            /* time in seconds we've been logged in (0 or 1 mean not logged in)*/
  491.     Boolean                         giUsingPrintQuotas;            /* true if logged in user is using printer quotas*/
  492.     Boolean                         giUsingDiskQuotas;            /* true if logged in user has disk quotas active*/
  493.  
  494.                                                                 /* Version 6 fields - As of Mac OS 9's "Multiple Users 1.0"*/
  495.     Boolean                         giInSystemAccess;            /* true if system is in System Access (i.e., owner logged in)*/
  496.     Boolean                         giUserFolderEnabled;        /* true if FindFolder is redirecting folders (uses giUserName for user)*/
  497.     short                             giReserved8;
  498.     long                             giReserved9;
  499.     Boolean                         giInLoginScreen;            /* true if no user has logged in (including owner)*/
  500.  
  501.  
  502.                                                                 /* May have more fields added in future, so never check for sizeof(GestaltRec)*/
  503.  
  504. };
  505. typedef struct MultiUserGestalt            MultiUserGestalt;
  506. typedef MultiUserGestalt *                MultiUserGestaltPtr;
  507. typedef MultiUserGestaltPtr *            MultiUserGestaltHandle;
  508.  
  509.  
  510.  
  511. #if PRAGMA_STRUCT_ALIGN
  512.     #pragma options align=reset
  513. #elif PRAGMA_STRUCT_PACKPUSH
  514.     #pragma pack(pop)
  515. #elif PRAGMA_STRUCT_PACK
  516.     #pragma pack()
  517. #endif
  518.  
  519. #ifdef PRAGMA_IMPORT_OFF
  520. #pragma import off
  521. #elif PRAGMA_IMPORT
  522. #pragma import reset
  523. #endif
  524.  
  525. #ifdef __cplusplus
  526. }
  527. #endif
  528.  
  529. #endif /* __FOLDERS__ */
  530.  
  531.